package com.axxy.decorate;

/**
 * @author 一缕茜阳
 * @date 2021/8/2
 */
public class DecorateDemo2 {
    public static void main(String[] args) {
        Yasuo yasuo = new Oringinal();
        Changer yasuoChange = new Changer(yasuo, "1");
        yasuo.display();
        yasuoChange.display();
    }
}

interface Yasuo {
    public void display();
}

class Oringinal implements Yasuo {

    @Override
    public void display() {
        System.out.println("原画亚索");
    }
}

class Changer implements Yasuo {

    private Yasuo yasuo;
    private String no;

    public Changer(Yasuo yasuo, String no) {
        this.yasuo = yasuo;
        this.no = no;
    }

    private void getCloth() {
        System.out.println("选择皮肤" + no);
    }

    @Override
    public void display() {
        yasuo.display();
        getCloth();
    }
}